{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "pro = ts.pro_api('4254f628f98d21e6f72c24018da61ea5a271f1e5d392ecd1ee83b3eb')\n",
    "# 拉取数据\n",
    "df = pro.daily(**{\n",
    "    \"ts_code\": \"601939.SH\",\n",
    "    \"trade_date\": \"\",\n",
    "    \"start_date\": 20100101,\n",
    "    \"end_date\": 20241225,\n",
    "    \"offset\": \"\",\n",
    "    \"limit\": \"\"\n",
    "}, fields=[\n",
    "    \"ts_code\",\n",
    "    \"trade_date\",\n",
    "    \"open\",\n",
    "    \"high\",\n",
    "    \"low\",\n",
    "    \"close\",\n",
    "    \"pre_close\",\n",
    "    \"change\",\n",
    "    \"pct_chg\",\n",
    "    \"vol\",\n",
    "    \"amount\"\n",
    "])\n",
    "print(df)\n",
    "\n",
    "        "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
